<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Eigen: Eigen::NumTraits&lt; T &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.4.90 (git rev 67eeba6e720c5745abc77ae6c92ce0a44aa7b7ae)</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.svg"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('structEigen_1_1NumTraits.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="structEigen_1_1NumTraits-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">Eigen::NumTraits&lt; T &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__DenseMatrixManipulation__chapter.html">Dense matrix and array manipulation</a> &raquo; <a class="el" href="group__DenseMatrixManipulation__Reference.html">Reference</a> &raquo; <a class="el" href="group__Core__Module.html">Core module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename T&gt;<br />
class Eigen::NumTraits&lt; T &gt;</h3>

<p>Holds information about the various numeric (i.e. scalar) types allowed by <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a>. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">T</td><td>the numeric type at hand</td></tr>
  </table>
  </dd>
</dl>
<p>This class stores enums, typedefs and static methods giving information about a numeric type.</p>
<p>The provided data consists of: </p><ul>
<li>A typedef <code>Real</code>, giving the "real part" type of <em>T</em>. If <em>T</em> is already real, then <code>Real</code> is just a typedef to <em>T</em>. If <em>T</em> is <code>std::complex&lt;U&gt;</code> then <code>Real</code> is a typedef to <em>U</em>. </li>
<li>A typedef <code>NonInteger</code>, giving the type that should be used for operations producing non-integral values, such as quotients, square roots, etc. If <em>T</em> is a floating-point type, then this typedef just gives <em>T</em> again. Note however that many <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a> functions such as internal::sqrt simply refuse to take integers. Outside of a few cases, <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library.">Eigen</a> doesn't do automatic type promotion. Thus, this typedef is only intended as a helper for code that needs to explicitly promote types. </li>
<li>A typedef <code>Literal</code> giving the type to use for numeric literals such as "2" or "0.5". For instance, for <code>std::complex&lt;U&gt;</code>, Literal is defined as <code>U</code>. Of course, this type must be fully compatible with <em>T</em>. In doubt, just use <em>T</em> here. </li>
<li>A typedef <em>Nested</em> giving the type to use to nest a value inside of the expression tree. If you don't know what this means, just use <em>T</em> here. </li>
<li>An enum value <em>IsComplex</em>. It is equal to 1 if <em>T</em> is a <code>std::complex</code> type, and to 0 otherwise. </li>
<li>An enum value <em>IsInteger</em>. It is equal to <code>1</code> if <em>T</em> is an integer type such as <code>int</code>, and to <code>0</code> otherwise. </li>
<li>Enum values ReadCost, AddCost and MulCost representing a rough estimate of the number of CPU cycles needed to by move / add / mul instructions respectively, assuming the data is already stored in CPU registers. Stay vague here. No need to do architecture-specific stuff. If you don't know what this means, just use <code><a class="el" href="namespaceEigen.html#a3163430a1c13173faffde69016b48aaf">Eigen::HugeCost</a></code>. </li>
<li>An enum value <em>IsSigned</em>. It is equal to <code>1</code> if <em>T</em> is a signed type and to 0 if <em>T</em> is unsigned. </li>
<li>An enum value <em>RequireInitialization</em>. It is equal to <code>1</code> if the constructor of the numeric type <em>T</em> must be called, and to 0 if it is safe not to call it. Default is 0 if <em>T</em> is an arithmetic type, and 1 otherwise. </li>
<li>An epsilon() function which, unlike <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/epsilon">std::numeric_limits::epsilon()</a>, it returns a <em>Real</em> instead of a <em>T</em>. </li>
<li>A dummy_precision() function returning a weak epsilon value. It is mainly used as a default value by the fuzzy comparison operators. </li>
<li>highest() and lowest() functions returning the highest and lowest possible values respectively. </li>
<li>digits() function returning the number of radix digits (non-sign digits for integers, mantissa for floating-point). This is the analogue of <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/digits">std::numeric_limits&lt;T&gt;::digits</a> which is used as the default implementation if specialized. </li>
<li>digits10() function returning the number of decimal digits that can be represented without change. This is the analogue of <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/digits10">std::numeric_limits&lt;T&gt;::digits10</a> which is used as the default implementation if specialized. </li>
<li>min_exponent() and max_exponent() functions returning the highest and lowest possible values, respectively, such that the radix raised to the power exponent-1 is a normalized floating-point number. These are equivalent to <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/min_exponent">std::numeric_limits&lt;T&gt;::min_exponent</a>/ <a href="http://en.cppreference.com/w/cpp/types/numeric_limits/max_exponent">std::numeric_limits&lt;T&gt;::max_exponent</a>. </li>
<li>infinity() function returning a representation of positive infinity, if available. </li>
<li>quiet_NaN function returning a non-signaling "not-a-number", if available. </li>
</ul>
</div>
<p>Inherits Eigen::GenericNumTraits&lt; T &gt;.</p>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="NumTraits_8h_source.html">NumTraits.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="structEigen_1_1NumTraits.html">NumTraits</a></li>
    <li class="footer">Generated on Thu Apr 21 2022 13:07:56 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
